package com.only.common.util.ssh;

import lombok.Data;

/**
 * @author only
 * @date 2024/2/19
 * @description
 */
@Data
public class DownloadFileResult {
    /**
     * 执行是否成功
     */
    private boolean isSuccess;

    /**
     * 错误信息
     */
    private String errMessage = "";

    /**
     * 下载到本地的文件名字
     */
    private String localFileName;

    /**
     * 远程服务器中文件的名字
     */
    private String remoteFileName;

    public DownloadFileResult(String errMessage, String localFileName, String remoteFileName) {
        this.isSuccess = false;
        this.localFileName = localFileName;
        this.remoteFileName = remoteFileName;
        this.errMessage = errMessage;
    }

    public DownloadFileResult(String localFileName, String remoteFileName) {
        this.isSuccess = true;
        this.localFileName = localFileName;
        this.remoteFileName = remoteFileName;
    }
}
